<!--
 * @Descripttion: 
 * @Copyright: 武汉一一零七科技有限公司©版权所有
 * @Link: www.s1107.com
 * @Contact: QQ:2487937004
 * @LastEditors: cbing
 * @LastEditTime: 2020-05-01 22:52:38
 -->
<script>
	var pnum = {$pnum};
	{if condition="(isset($filter)) AND ($filter)"}
	var filter = {$filter};
	{/if}
	{if condition="!isset($search) && !isset($cate_id)"}
	var search = 0;
	var cate_id = 0;
	var goUrl = "/{$Request.module}/goods/lst/filter/"+filter+".html?page="+pnum;
	{elseif condition="isset($search) && $search" /}
	var search = {$search};
	var cate_id = 0;
	var goUrl = "/{$Request.module}/goods/search.html?page="+pnum;
	{elseif condition="isset($cate_id) && $cate_id" /}
	var cate_id = {$cate_id};
	var search = 0;
	var goUrl = "/{$Request.module}/goods/catelist/cate_id/"+cate_id+"/filter/"+filter+".html?page="+pnum;
	{/if}
</script>                           
                        
                        <table class="table table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th style="width:3%">ID</th>
                                    <th style="width:3%">状态</th>
                                    <th style="width:25%">商品标题</th>
                                    <th style="width:15%">缩略图</th>
                                    <th style="width:10%">店铺分类</th>
                                    <th style="width:10%">市场价格</th>
                                    <th style="width:10%">销售价格</th>
                                    <th style="width:5%">上架</th>
<!--                                    <th style="width:5%">是否直播间商品</th>-->
                                    <th style="width:20%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {if condition="$list->isEmpty() == false"}
							{foreach name="list" item="v"} 
                                <tr>
                                    <td>{$v.id}</td>
                                    <td>{switch name="v.checked"}{case value="1"}<font style="color:#1992FC;">正常</font>{/case}{case value="2"}<font style="color:#F00;">违规</font>{/case}{/switch}</td>
                                    <td>{$v.goods_name}</td> 
                                    <td><img src="{$v.thumb_url}" width="80px" height="80px"/></td>
                                    <td>{$v.cate_name}</td>
                                    <td>{$v.market_price}元</td>
                                    <td>{$v.shop_price}元</td>
                                    <td>
                                    {if condition="$v['onsale'] eq 1"}
                                    <button class="btn btn-primary btn-xs" type="button" onclick="changeTableVal({$v.id},'onsale',this);"><i class="fa fa-check"></i></button>
                                    {elseif condition="$v['onsale'] eq 0" /}
                                    <button class="btn btn-danger btn-xs" type="button" onclick="changeTableVal({$v.id},'onsale',this);"><i class="fa fa-times"></i></button>
                                    {/if}
                                    </td>
<!--                                    <td>-->
<!--                                    {if condition="$v['is_live'] eq 1"}-->
<!--                                    <button class="btn btn-primary btn-xs" type="button" onclick="changeTableVal({$v.id},'is_live',this);"><i class="fa fa-check"></i></button>-->
<!--                                    {elseif condition="$v['is_live'] eq 0" /}-->
<!--                                    <button class="btn btn-danger btn-xs" type="button" onclick="changeTableVal({$v.id},'is_live',this);"><i class="fa fa-times"></i></button>-->
<!--                                    {/if}-->
<!--                                    </td>-->
                                    <td><button type="button" class="btn btn-primary btn-xs" onclick="editgoods({$v.id},this);"><i class="fa fa-pencil"></i>&nbsp;编辑</button>&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-danger btn-xs" onclick="recycle({$v.id},this);"><i class="fa fa-close"></i>&nbsp;回收站</button></td>
                                </tr>
							{/foreach}
							{else/}
							<tr><td colspan="8" style="text-align:center; font-size:14px;">没有找到相关数据</td></tr>
							{/if}								
                            </tbody>
                        </table>
                        <div class="row"><div class="pagination" style="float:right; margin-right:20px;">{$page}</div></div>